package com.qingchi.server.controller.login;

import com.socialuni.social.model.common.ResultVO;
import com.qingchi.base.model.user.UserDO;
import com.qingchi.base.platform.weixin.login.LoginDataVO;
import com.qingchi.base.service.LoginService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author qinkaiyuan
 * @date 2019-02-17 14:14
 */
@RestController
@RequestMapping("login")
@Slf4j
public class LoginController {
    @Resource
    private LoginService loginService;

    //三方渠道登录，qq、wx、社交联盟，兼容各平台，h5、app、mp
    @PostMapping("providerLogin")
    @ResponseBody
    public ResultVO<?> providerLogin(@RequestBody LoginDataVO loginData) {
        return loginService.providerLogin(loginData);
    }

    @PostMapping("phoneLogin")
    @ResponseBody
    public ResultVO<?> phoneLogin(@RequestBody LoginDataVO bindPhoneVO, Integer devId, UserDO user) {
        return null;
    }
}
